<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head th:include="_meta :: header">
    <meta charset="utf-8">
    <title>故障管理</title>
</head>
<head>
    <style type="text/css">
        body,
        html {
            margin: 0;
            padding: 0;
            height: 100%;
            color: #fff;
        }

        .left,
        .right {
            float: left;
            width: 50%;
            height: 100%;
        }

        /* .left { background-color: red; }
    .right { background-color: #000; } */
    </style>
</head>

<body>
    <article class="page-container">
        <form class="form form-horizontal" id="form-article-add">
            <div class="left" style="margin-bottom: 20px">
                <div class="row cl" style="margin-top:100px">
                    <label class="form-label col-xs-4 col-sm-2" style="width:150px"><span class="c-red">*</span>故障对应规则：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <span class="select-box">
                            <input type="checkbox" name="rule" th:value="">
                        </span>
                    </div>
                </div>

                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2" style="width:150px"><span class="c-red">*</span>故障描述：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <textarea name="meapoint_des" cols="" rows="" class="textarea" placeholder="简单描述一下故障。。。"
                            datatype="*10-100" dragonfly="true" nullmsg="备注不能为空！" onKeyUp="textarealength(this,200)"></textarea>
                        <p class="textarea-numberbar"><em class="textarea-length">0</em>/200</p>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2" style="width:150px"><span class="c-red">*</span>解决方案：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <textarea name="meapoint_des" cols="" rows="" class="textarea" placeholder="简单描述一下解决方案。。。"
                            datatype="*10-100" dragonfly="true" nullmsg="备注不能为空！" onKeyUp="textarealength(this,200)"></textarea>
                        <p class="textarea-numberbar"><em class="textarea-length">0</em>/200</p>
                    </div>
                </div>
            </div>
            <div class="right">
                <div class="row cl">
                    <button onClick="article_save_submit();" class="btn btn-primary radius" type="submit" style="position:absolute;top:100pxpx;right:480px"><i
                            class="Hui-iconfont">&#xe632;</i> 上传图片</button>
                    <label class="form-label col-xs-4 col-sm-2" style="width:500px;text-align: center;margin-top:50px"><span
                            class="c-red">*</span>图片</label>
                    <img src="temp/big/chufang.jpg" style="height:420px;margin-left: 50px">
                </div>
                <div class="row cl">
                    <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                        <button onClick="article_save_submit();" class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i>
                            保存</button>
                        <!-- <button onClick="article_save();" class="btn btn-secondary radius" type="button"><i class="Hui-iconfont">&#xe632;</i>
                            保存草稿</button> -->
                        <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
                    </div>
                </div>
            </div>
        </form>
    </article>

    <script type="text/javascript" th:src="@{/lib/jquery.validation/1.14.0/jquery.validate.js}" src="lib/jquery.validation/1.14.0/jquery.validate.js"></script>
    <script type="text/javascript" th:src="@{/lib/jquery.validation/1.14.0/validate-methods.js}" src="lib/jquery.validation/1.14.0/validate-methods.js"></script>
    <script type="text/javascript" th:src="@{/lib/jquery.validation/1.14.0/messages_zh.js}"  src="lib/jquery.validation/1.14.0/messages_zh.js"></script>
    <script>
        /*故障-添加*/
        function rules_add(title, url, w, h) {
            var index = layer.open({
                type: 2,
                title: title,
                content: url
            });
            layer.full(index);
        }
        //表单验证
        $("#form-article-add").validate({
            rules: {
                meapoint_id: {
                    required: true,
                },
                meapoint_num: {
                    required: true,
                },
                meapoint_name: {
                    required: true,
                },
                meapoint_des: {
                    required: true,
                },
            },
            onkeyup: false,
            focusCleanup: true,
            success: "valid",
            submitHandler: function (form) {
                //$(form).ajaxSubmit();
                var index = parent.layer.getFrameIndex(window.name);
                //parent.$('.btn-refresh').click();
                parent.layer.close(index);
            }
        });
    </script>
    <!--/请在上方写此页面业务相关的脚本-->
</body>

</html>
<!--_meta 作为公共模版分离出去-->